package com.sunny.springboot2.event;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MainApp {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(CustomEventConfigration.class);
        CustomEventPublisher cvp = (CustomEventPublisher) applicationContext.getBean("customEventPublisher");
        cvp.publish();
        cvp.publish();
    }
}